# 1、整型 int
age = 18
print(age)
print(type(age))

# 2、浮点 float
PI = 3.14
print(PI)
print(type(PI))

# 3、空值 None
girl_friend = None
print(girl_friend)
print(type(girl_friend))

# 4、布尔 bool
is_marry = False
print(is_marry)
print(type(is_marry))

# 5、字符串 str
# 1、用单引号和双引号一样的
name = 'caichang'
name = "caichang"
print(name)
print(type(name))

# 2、r用法:原样输出
# message = ' i'm ok !'
message = " i'm ok !"
print(message)
path = "d:\nawei\taitai\hehe"
print(path)
path = "d:\\nawei\\taitai\hehe"
print(path)

path = r"d:\nawei\taitai\hehe"
print(path)

# 3、f的用法:拼接字符串（格式化字符串）
print('我叫name，我今年age')
print('我叫：' + name + ',我今年：' + str(age))  # java
print('我叫：%s,我今年：%d' % (name, age))  # c
print(f'我叫：{name},我今年：{age}')


# 4、字符串有自己的各种函数，他是你通向高手的绊脚石
name='caichang'
print(name.upper())
print(max(name))


# 5、可以把字符串当元组用
name='caichang'
print(name[2])
print(name[:3])
print(name[::-1]) #字符串的反向输出



